package com.usian.article.controller;

import com.usian.apis.article.ArticleInfoControllerApi;
import com.usian.article.service.ArticleInfoService;
import com.usian.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("api/v1/articleInfo")
public class ArticleInfoController implements ArticleInfoControllerApi {

    @Autowired
    private ArticleInfoService articleInfoService;

    @Override
    @PostMapping("/load_article_behavior")
    public ResponseResult getArticleInfo(@RequestParam Long articleId, @RequestParam Integer authorId) {
        return articleInfoService.getArticleInfo(articleId, authorId);
    }
}
